CriticalSection.Leave Method

Call Leave when you are finished using the protected resource and give it back to the CriticalSection. Every time you call Enter or TryEnter and succeed, you must call Leave.

Syntax

This includes calling it recursively Otherwise the resource will be protected indefinitely.